<?php
    include('top.php');
    $info = "select * from article ORDER BY id DESC";
    $info_result = $link->query($info);
?>
<div class="home-body">
    
    <div class="home-container-body">
        <div class="home-side-by-side-start" style="width: 300px;">
            <div class="info_flex-container">
                <div class="info_flex-item"><div class="info_title">通知公告</div></div>
            </div>
            <div class="info_flex-container">
                <div class="info_flex-item">新闻标题</div>
                <div class="info_flex-item info_right">发布时间</div>
            </div>
            <?php while($info_row = mysqli_fetch_array($info_result)) { ?>
            <div class="info_flex-container">
                <div class="info_flex-item"><a href="article.php?id=<?php echo $info_row['id']; ?>" class="info"><?php echo $info_row['title']; ?></a></div>
                <div class="info_flex-item info_right"><?php echo date("Y-m-d", $info_row['time']) ?></div>
            </div>
            <?php } ?>
        </div>
    </div>
</div>

<?php include('bottom.php'); ?>